<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
</head>
<style type="text/css">
    div {
        width: 180px;
        height: 180px;
        background: white;
        border: red 1px solid;
    }
</style>
</head>
<body>
<input type="button" value="改变id=one的元素的背景色为红色" id="b1"/>
<br><br>
<input type="button" value="改变元素名为<div>的所有元素的背景色为红色" id="b2"/>
<br><br>
<input type="button" value="改变class为mini的所有元素的背景色为红色" id="b3"/>
<br><br>

<div id="one">
    id为one
</div>
<br>
<div id="two" class="mini">
    id为two ,class是 mini
</div>
</body>
</html>
<script type="text/javascript">
   $("#b1").click(function () {
       $("#one").css("background-color","red");
   })
    $("#b2").click(function () {
        $("div").css("background-color","green")
    })
    $("#b3").click(function () {
        $(".mini").css("background-color","black")
    })
</script>
